<%@ taglib uri="/tld/extremecomponents" prefix="ec" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

	<script src = "../js/jquery-1.12.1.js" type = "text/javascript"></script>
	<script src = "../js/common.js" type = "text/javascript"></script>
	
	<link href="<%=request.getContextPath() %>/css/extremecomponents.css" rel="stylesheet" type="text/css" />
	<link href="<%=request.getContextPath() %>/css/global.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/style.css" />

<title>作业完成情况整体分析</title>
</head>
<script type="text/javascript">

	//作业框回显
	$(function() {
	$("select[name='jobId']")
	.val(
	'<c:out value="${CONDITIONMAP.jobId}" />');
	});

	$(function() {
	$("#lookfor").click(
        function() {
            formPost(window.SearchState, '','jobcomplete?ActionType=job_Complete_Status_Overall', this);
        });
	});
	
	
	//应交名单
	function all_name(e){
		var mount=$(e).text();
		if(mount<=0 || mount==null || mount=="" || mount=='' ){
			alert("应交人数异常");
		}else{
			var jobId = $(e).parent().parent().find(".job_id").text(); 
	        $.ajax({
	            type : "post",
	            dataType:"text",
	            url : "jobcomplete?ActionType=job_Complete_Status_Overall_All",
	            data : {"JOB_ID":jobId},
	            success : function(message) {
	                	confirm("应交学生名单为：\n"+message); 
	                	//在页面上弹出确认对话框
	            }
	        });
		}
	}
	
	
	//补交名单
	function supplementary_name(e){
		var mount=$(e).text();
		if(mount==0 || mount==null || mount=="" || mount=='' ){
			alert("补交人数为0");
		}else{
			var jobId = $(e).parent().parent().find(".job_id").text(); 
	        $.ajax({
	            type : "post",
	            dataType:"text",
	            url : "jobcomplete?ActionType=job_Complete_Status_Overall_Supplementary",
	            data : {"JOB_ID":jobId},
	            success : function(message) {
	                	confirm("补交学生名单为：\n"+message); 
	                	//在页面上弹出确认对话框
	            }
	        });
		}
	}
	
	
	//未交名单
	function overdue_name(e){
		var mount=$(e).text();
		if(mount==0 || mount==null || mount=="" || mount=='' ){
			alert("未交人数为0");
		}else{
			var jobId = $(e).parent().parent().find(".job_id").text(); 
	        $.ajax({
	            type : "post",
	            dataType:"text",
	            url : "jobcomplete?ActionType=job_Complete_Status_Overall_Overdue",
	            data : {"JOB_ID":jobId},
	            success : function(message) {
	                	confirm("未交学生名单为：\n"+message); 
	                	//在页面上弹出确认对话框
	            }
	        });
		}
	}
	
	//正常提交名单
	function normal_name(e){
		var mount=$(e).text();
		if(mount==0 || mount==null || mount=="" || mount=='' ){
			alert("正常提交人数为0");
		}else{
			var jobId = $(e).parent().parent().find(".job_id").text(); 
	        $.ajax({
	            type : "post",
	            dataType:"text",
	            url : "jobcomplete?ActionType=job_Complete_Status_Overall_Normal",
	            data : {"JOB_ID":jobId},
	            success : function(message) {
	                	confirm("正常提交学生名单为：\n"+message); 
	                	//在页面上弹出确认对话框
	            }
	        });
		}
	}
</script>
<body>
<div id="current">当前位置：作业完成情况分析 &gt; 整体分析</div>
<div class="page-container">
    <form id="SearchState" method="post">
	<div class="text-c"> 
		作业:
		<span class="select-box inline">
			<select class="select"  name="jobId" id="jobId">
				<option value="" selected="selected">全部作业</option>
				<c:forEach items="${ALLJOB }"  var="everyJob">
				<option value="${everyJob.job_id }">${everyJob.job_id}</option>
				</c:forEach>
			</select>
		</span>
		<input type="hidden" id="" name="">
		<button id="lookfor" type="button" class="btn btn-primary radius">查询</button>
	</div>
	</form>
	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort">
			<thead>
				<tr class="text-c">
					<!-- <th width="25"><input type="checkbox" name="" value=""></th> -->
					<th width="105">作业号</th>
					<th width="105">应交</th>
					<th width="105">已交</th>
					<th width="105">补交</th>
					<th width="105">补交率</th>
					<th width="105">未交</th>
					<th width="105">未交率</th>
				</tr>
			</thead>
			<tbody>
					 <c:forEach items="${JOBCOMPLETESTATUS}"  var="currentJob">
					 <tr class="text-c">
	                               <td class="job_id">${currentJob.job_id}</td>
	                               <td class="payable"><span  onClick="all_name(this)">${currentJob.payable}</span></td>
	                                 <td class="normal"><span  onClick="normal_name(this)">${currentJob.normal}</span></td>
	                               <td class="supplementary"><span  onClick="supplementary_name(this)">${currentJob.supplementary}</span></td>
	                                <td class="supplementary_rate">${currentJob.supplementary/currentJob.payable*100}%</td>
	                               <td class="overdue"><span  onClick="overdue_name(this)">${currentJob.overdue}</span></td>
	                               <td class="overdue_rate">${currentJob.overdue/currentJob.payable*100}%</td>
	                   </tr>
	                  </c:forEach>
			</tbody>
		</table>
	</div>
</div>
</body>
</html>